#include "DeathMenu.h"

DeathMenu::DeathMenu()
{
}

DeathMenu::~DeathMenu(void)
{
}

void DeathMenu::loadTextures(){
	loadOpenGL2DTextureBMP("death.bmp", &image, GL_RGB);
}

void DeathMenu::draw(){
	glDisable(GL_LIGHTING);
	glMatrixMode( GL_PROJECTION );
	glPushMatrix();    
	glLoadIdentity();
	glOrtho( 0.0, 800, 0.0, 600, -1.0, 1.0 );
	glMatrixMode( GL_MODELVIEW );
	glPushMatrix();    
	glLoadIdentity();
	glEnable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, image);

	glColor3f(1, 1, 1); 
	glTranslatef(200,300,0);

	glBegin(GL_QUADS);

	glTexCoord2f(0.0f, 0.0f); glVertex3f(0, 0,  0);	// Bottom Left Of The Texture and Quad
	glTexCoord2f(1.0f, 0.0f); glVertex3f( 400, 0,  0);	// Bottom Right Of The Texture and Quad
	glTexCoord2f(1.0f, 1.0f); glVertex3f( 400,  200,  0);	// Top Right Of The Texture and Quad
	glTexCoord2f(0.0f, 1.0f); glVertex3f(0,  200,  0);	// Top Left Of The Texture and Quad

	glEnd();	
	glTranslatef(-200,-300,0);
	glDisable(GL_TEXTURE_2D);


	//Unsets Projection Mode
	glMatrixMode( GL_PROJECTION );
	glPopMatrix();  
	glMatrixMode( GL_MODELVIEW );
	glPopMatrix(); 
}